package zj.xinxin.web.controller.system;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import zj.xinxin.api.moudle.system.api.LoginLogService;
import zj.xinxin.api.moudle.system.dto.LoginLogDto;
import zj.xinxin.common.core.vo.system.LoginLogVo;
import zj.xinxin.common.result.PageResult;
import zj.xinxin.common.result.ResponseResult;

/**
 * @author junzhou
 * @date 2022/3/23 14:07
 * @since 1.8
 */
@RestController
@Api(tags = "用户日志模块")
@RequestMapping("/loginLog")
public class LoginLogController {

    @Autowired
    private LoginLogService loginLogService;


    /**
     * 查询登陆日志信息
     *
     * @param loginLogVo 日志信息vo类
     * @return {@link LoginLogDto} 日志信息
     */
    @ApiOperation(value = "查询登陆日志信息")
    @GetMapping("/list")
    public ResponseResult<PageResult<LoginLogDto>> listLoginLog(LoginLogVo loginLogVo) {
        return ResponseResult.success("登陆日志查询成功！",
                loginLogService.listLoginLog(loginLogVo));
    }

}
